package org.hq.video.com;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;


@Controller
public class Login {
   @PreAuthorize("hasAnyRole('admin')")
    @GetMapping(value ="/index")
    public String index(){
        System.out.println("index");
        return "index";
    }

    /**
     * 用户登录页面
     * @return
     */
    @GetMapping("/login")
    public String login(){
        return "login";
    }


}
